
package data;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 *
 * @author Alejandro
 */
public class ReporteFinalForm extends org.apache.struts.action.ActionForm {
    
    private String reporte;

    public void setReporte(String reporte) {
        this.reporte = reporte;
    }

    public String getReporte() {
        return reporte;
    }
    
    public ReporteFinalForm() {
        super();
        // TODO Auto-generated constructor stub
    }

    @Override
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();
        if ("".equals(reporte)) {
            errors.add("global", new ActionMessage("error.global.camposvacios"));
        }
        return errors;
    }
}
